#! /usr/bin/env bash
# encoding: utf-8.0

ld_postgres="/lyndon/iSoft/postgres/lib"
ld_ivorysql="/lyndon/iSoft/IvorySQL/lib"

function test_split_func()
{
  local params="$1"
  IFS=:
  declare -a to_array
  i=1
  for dir in $params
  do
    echo "I:${i}"
    if [ ${dir} == ${ld_postgres} -o ${dir} == ${ld_ivorysql} ]; then
      continue
    fi
    to_array[$i]=${dir}
    let i+=1
  done

  to_array[$i]=${ld_postgres}

  echo "arr:"${to_array[@]}

}

echo "org:"${LD_LIBRARY_PATH}

test_split_func ${LD_LIBRARY_PATH}



